home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / falcon / programm.ing / nt_dsp1.lzh / NT_DSP1.MSA / FNTNS / SQRT3.HLP < prev    next >
Text File  |  1989-01-24  |  815b  |  22 lines

  1.          Name: SQRT3.ASM
  2.          Type: Assembler Macro
  3.       Version: 1.0
  4.   Last Change:  9-Feb-87
  5.  
  6.   Description: Full Precision Square Root Macro
  7.  
  8.  SQRT3 calculates the square root of an input number.  The input
  9.  may be any 48 bit positive fraction, including zero.  The input
  10.  number is assumed to be in Y (Y1:Y0) and the resulting square
  11.  root is returned in B.
  12.  
  13.  The algorithm uses a successive approximation technique to
  14.  achieve full 23 bit precision in the result.  Beginning with
  15.  the most significant bit, it sets each bit to form a best guess,
  16.  squares the guess and compares the result to the input number. 
  17.  If the guess is too big, that bit is reset and the next least
  18.  significant bit is checked.
  19.  
  20.  The library program SQRT3T provides an example of how to use the
  21.  SQRT3 macro.
  22.